<md-toolbar id="toolbar">

    <div class="md-toolbar-tools">
        <md-truncate ><a href="/#!/home" title="主页">&nbsp;&nbsp;Q & A</a></md-truncate>
        <span flex=""></span>

        <!--<md-button   ng-click="getLog()" ng-if="username=='admin'">网站情况</md-button>-->

        <md-menu-bar>
            <md-menu>
                <md-button ng-click="$mdMenu.open()" >进入领域</md-button>
                <md-menu-content>
                    <md-menu-item>
                        <md-button ng-click="career()" >职业规划</md-button>
                    </md-menu-item>
                    <md-menu-item>
                        <md-button ng-click="gym()" >健身顾问</md-button>
                    </md-menu-item>
                    <md-menu-item>
                        <md-button ng-click="travel()" >旅游咨询</md-button>
                    </md-menu-item>
                    <md-menu-item>
                        <md-button ng-click="iDesign()" >形象设计</md-button>
                    </md-menu-item>
                    <md-menu-item>
                        <md-button ng-click="car()" >购车咨询</md-button>
                    </md-menu-item>
                    <md-menu-item>
                        <md-button ng-click="law()" >法律咨询</md-button>
                    </md-menu-item>
                </md-menu-content>
            </md-menu>
        </md-menu-bar>

        <md-button   ng-click="question()" >提问</md-button>
        <md-button   ng-click="showAllQuestion()" ng-if="!isConsultant">发现</md-button>
        <md-menu-bar ng-if="isConsultant">
            <md-menu>
                <md-button ng-click="$mdMenu.open()" >
                    <span>回答</span>
                    <span ng-if="numberUnanswered > 0" class="notification">{{numberUnanswered}}</span>
                </md-button>
                <md-menu-content>
                    <md-menu-item>
                        <md-button ng-click="showAllQuestion()" >所有问题</md-button>
                    </md-menu-item>
                    <md-menu-item>
                        <md-button ng-click="showAllQuestionByConsultantId(consultantId)" >
                            <span>邀请我的</span>
                            <span ng-if="numberUnanswered > 0" style="font-weight: bold;color: red;padding-left: 2%">{{numberUnanswered}}</span>
                        </md-button>
                    </md-menu-item>
                </md-menu-content>
            </md-menu>
        </md-menu-bar>

        <div ng-if="!username">
            <md-button  ng-click="login()">登录</md-button>
            <md-button  ng-click="register()">注册</md-button>
        </div>
        <md-menu-bar ng-if="username">

            <md-menu>
                <md-button ng-click="$mdMenu.open()" >{{username}}&nbsp;
                    <span><image src="../../../src/images/icon/用户导航栏.png"></image></span></md-button>
                <md-menu-content>
                    <md-menu-item>
                        <md-button ng-click="personInfo(username)" >个人信息</md-button>
                    </md-menu-item>
                    <md-menu-item>
                        <md-button ng-click="recharge(username)" >知识币充值</md-button>
                    </md-menu-item>
                    <md-menu-item>
                        <md-button ng-click="logout()" >退出登录</md-button>
                    </md-menu-item>
                </md-menu-content>
            </md-menu>
        </md-menu-bar>
    </div>
<!--
    <div class="md-toolbar-tools" ng-if="isConsultant">
        <md-truncate><a href="/#!/home" title="主页">&nbsp;&nbsp;Q & A</a></md-truncate>
        <span flex=""></span>
        <md-menu-bar>
            <md-menu>
                <md-button ng-click="$mdMenu.open()" >进入领域</md-button>
                <md-menu-content>
                    <md-menu-item>
                        <md-button ng-click="" >职业规划</md-button>
                    </md-menu-item>
                    <md-menu-item>
                        <md-button ng-click="" >健身顾问</md-button>
                    </md-menu-item>
                    <md-menu-item>
                        <md-button ng-click="" >旅游咨询</md-button>
                    </md-menu-item>
                    <md-menu-item>
                        <md-button ng-click="" >形象设计</md-button>
                    </md-menu-item>
                    <md-menu-item>
                        <md-button ng-click="" >购车咨询</md-button>
                    </md-menu-item>
                    <md-menu-item>
                        <md-button ng-click="" >法律咨询</md-button>
                    </md-menu-item>
                </md-menu-content>
            </md-menu>
        </md-menu-bar>
        <md-button   ng-click="question()" >提问</md-button>
        <md-menu-bar>
            <md-menu>
                <md-button ng-click="$mdMenu.open()" >回答</md-button>
                <md-menu-content>
                    <md-menu-item>
                        <md-button ng-click="showAllQuestion()" >所有问题</md-button>
                    </md-menu-item>
                    <md-menu-item>
                        <md-button ng-click="showAllQuestionByConsultantId()" >邀请我的</md-button>
                    </md-menu-item>
                </md-menu-content>
            </md-menu>
        </md-menu-bar>
        <div ng-if="username">
            <md-button  ng-click="logout()">登出</md-button>
        </div>
        <div ng-if="!username">
            <md-button  ng-click="login()">登录</md-button>
            <md-button  ng-click="register()">注册</md-button>
        </div>
        <md-button  target="_blank">{{username}}</md-button>
    </div>
-->
</md-toolbar>